home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / programmer / 6905 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: winternet.com!news
  2. From: apang@winternet.com (Anthony Pang)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Re: alloca() on Amiga?
  5. Date: 5 Apr 1996 00:09:50 GMT
  6. Organization: Winternet Corporation, Mpls, MN
  7. Message-ID: <4k1oce$lub@blackice.winternet.com>
  8. References: <2720tdg60.alamito@marketgraph.xs4all.nl>
  9. NNTP-Posting-Host: athens.imaginary.com
  10. Keywords: alloca
  11.  
  12. In article <2720tdg60.alamito@marketgraph.xs4all.nl>,
  13. Ruud van Gaal <rvg@marketgraph.xs4all.nl> wrote:
  14. >Is there a nice way to get a working alloca() function for the Amiga?
  15. >It is present on all PC and Unix C implementations, but not on the Amiga.
  16. >(it allocates mem from the stack, automatically freeing it upon return from 
  17. >subroutine).
  18.  
  19. GCC and SAS have alloca().  I think DICE has it too.
  20.  
  21. Aztec C doesn't, but there's a package or two floating around
  22. on Aminet would provides alloca() (among other things) -- search for RConfig.
  23.  
  24. There's also a GNU alloca.c file (found somewhere in one of the GNU packages)
  25. that claims to be platform independent.  I've used it on occassion -- the only
  26. caveat is if your program is compiled with dynamic stack extension, then
  27. blocks may not be freed immediately upon function exit.
  28.